package com.uwantsoft.business.service.infrastructure;

import com.uwantsoft.business.facade.dto.user.DriverOverviewQueryCondition;
import com.uwantsoft.business.service.domain.addresses.FavoriteAddress;
import com.uwantsoft.business.service.domain.user.Driver;
import com.uwantsoft.business.service.domain.user.LicensePlate;
import com.uwantsoft.util.EntityRepository;

import java.util.List;

/**
 * @author LeiPeichen.
 */
public interface DriverRepository extends EntityRepository {

    public Driver findByPhoneNumber(String phoneNumber);

    public List<FavoriteAddress> findFavoriteAddresses(Driver driver);

    public List<LicensePlate> findLicensePlates(Driver driver);

    public LicensePlate findLicensePlate(String licensePlate);

    public LicensePlate findPriorityLicensePlate();

    public List<Driver> findDrivers(DriverOverviewQueryCondition condition);

    public int findDriverTotalAmount(DriverOverviewQueryCondition condition);
}
